
public class NoWeaversConfiguredInstanceLinker
{
    public ProjectWeaversReader ProjectWeaversReader;
    public WeaverAssemblyPathFinder WeaverAssemblyPathFinder;
    public BuildLogger Logger;
    public WeaverProjectFileFinder WeaverProjectFileFinder;

    public void Execute()
    {
        if (ProjectWeaversReader.Weavers.Count != 0)
        {
            return;
        }
        if (!ProjectWeaversReader.InSolutionWeavingEnabled || !WeaverProjectFileFinder.Found)
        {
            return;
        }

        var weaverProjectContainsType = WeaverAssemblyPathFinder.WeaverProjectContainsType("ModuleWeaver");
        if (!weaverProjectContainsType)
        {
            return;
        }

        Logger.LogInfo(string.Format("No weavers listed in '{0}' but found 'ModuleWeaver' in project 'Weavers' so will run that one instead.", ProjectWeaversFinder.ConfigFileName));
        var weaverEntry = new WeaverEntry
                                {
                                    AssemblyPath = WeaverProjectFileFinder.WeaverAssemblyPath,
                                    TypeName = "ModuleWeaver"
                                };
        ProjectWeaversReader.Weavers.Add(weaverEntry);
    }
}